using Microsoft.AspNetCore.Mvc;

namespace Table.web.Controllers;

[Route("/[Controller]/[action]/{id?}")]
public class TableController : Controller
{
    [HttpGet]
    public string Index(int id)
    {
        return id.ToString();
    }

    [HttpPost]
    public string Add([FromBody] Students stu)
    {
        return $"姓名:{stu.Name}   年龄:{stu.Age}  身高：{stu.Helig}";
    }
}

public class Students
{
    // public Students()
    // {
    //     this.Name="8888888888888";
    // }
    public string Name{ get; set;}=null!;
    public int Age {get;set;}

    public double Helig {get;set;}
    
}